﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>打印小票</title>
    <script src="js/jquery-1.11.0.js"></script>
    <meta charset="utf-8"/>
</head>
<body>
<div><a href="javascript:;" id="prints">点我打印</a></div>
<div id="printArea">
    <div style='text-align: center;'><img src='img/ticket_logo.png' width='70%'></div>
    <div style='font-size: 12px; text-align: center; margin-top: 5px;'>重庆象米国际欧洲生活品质超市<br>【象米紫金广场店】</div>
    <div style='text-align: left; font-size: 10px; margin-top: 8px'>地址：渝中区富力海洋广场 168 号<br>电话：02388886666<br>时间：2017-03-21
        15:40:11
    </div>
    <div style='border-top:#000 1px dotted; padding-top:5px; border-bottom:#000 1px dotted; padding-bottom:5px; margin-top: 5px;'>
        <table width='100%' style='font-size: 10px; margin-top: 10px;' border='0' cellspacing='0'>
            <tr style='margin-bottom: 5px;'>
                <th width='60%' align='left'>名称</th>
                <th width='20%' align='center'>数量</th>
                <th width='20%' align='right'>价格</th>
            </tr>
            <tr style='font-size: 9px'>
                <td>Canmake/井田花瓣5色腮红哑光草莓芙蓉色04</td>
                <td align='center'>1</td>
                <td align='right'>79.00</td>
            </tr>
        </table>
        <div style='clear: both; margin-top: 5px;'></div>
        <table width='100%' style='font-size: 10px;'>
            <tr>
                <td>总&nbsp;&nbsp;&nbsp;计</td>
                <td align='right'>79.00</td>
            </tr>
            <tr>
                <td>人民币</td>
                <td align='right'>79.00</td>
            </tr>
        </table>
    </div>
    <div style='text-align: right; font-size: 12px; margin-top: 15px'>操作人：huang</div>
    <div style='text-align: center; margin-top: 12px; font-size: 10px'>*****本票为退货小票*****</div>
    <div style='font-size: 11px; text-align: center; position: relative; top: -5px;'>单号：0321154011566</div>
    <div style='text-align: center;'><img src='img/ewm.jpg' width='55%'></div>
    <div style='text-align: center;font-size: 11px;'>谢谢惠顾，欢迎再次光临！<br>服务监督热线<br><span>400-000-9011</span></div>
    <div style='font-size: 11px; text-align: center'>购物小票为退货/换货<br>开具发票等有效凭证<br>请妥善保管</div>
    <div style='padding-top:130px;'>.</div>
</div>
<script language="javascript" src="js/LodopFuncs.js"></script>
<script language="javascript" src="js/JsBarcode.all.min.js"></script>
<script language="javascript" type="text/javascript">
    var barcode = document.getElementById('barcode'),
        str = "0316180831389",
        options = {
            format:"CODE128",
            displayValue:false,
            fontSize:24,
            height:80
        };
    //JsBarcode(barcode, str, options);//原生
    $('#barcode').JsBarcode(str, options);//jQuery

    $("#prints").click(function () {
        var strHtml = $("#printArea").html()
        myAddHtml(strHtml);
    });

    function myAddHtml(strHtml) {
        var LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", strHtml);
        LODOP.SET_PRINT_PAGESIZE(3, 600, 50, "");
        LODOP.PRINT();
    }
</script>
</body>
</html>